<template>
	<view class="notice">
		<view class="notice-list">
			<block v-for="(item, index) in notice" :key="index">
				<view class="notice-list-item">
					<view class="nli-header">
						<view class="nli-header-title-wrap">
							<view class="nli-header-title">{{item.title}}</view>
						</view>
						<view class="nli-header-content">
							<!-- <text>
								{{item.note}}
							</text> -->
							<rich-text :nodes="item.note"></rich-text>
						</view>
						<view class="nli-header-time">{{item.createTimeStr}}</view>
					</view>
				</view>
			</block>
		</view>
	</view>
</template>
<script>
export default {
	data() {
		return {
			notice: []
		};
	},
	onShow() {
		this.getArt()
	},
	methods: {
		getArt () {
			this.$http.getArt().then(res => {
				const data = res.data
				if (data.success) {
					console.log(data)
					this.notice = data.data
					return
				}
				uni.showToast({
					title: data.errMsg,
					icon: 'none'
				});
			})
		},
	}
};
</script>
<style scoped lang="scss">
.notice {
	padding: 30upx;
	&-list-item {
		margin-bottom: 20upx;
		border-radius: 20upx;
		overflow: hidden;
		background-color: #fff;
		.nli-header  {
			padding: 20upx 30upx;
			&-title {
				font-size: 34upx;
				font-weight: 700;
			}
			&-time {
				margin-top: 5upx;
				color: #a7a7a7;
			}
			&-content {
				padding: 20upx 0;
				color: #777
			}
		}
	}
}
</style>
